import React, {useEffect, useRef, useState} from 'react';
import './css/landlord.moudel.css'
import axios from "axios";


function Landlord() {
    let [landlord,setlandlord]=useState('')
    const ref:any=useRef(window);
    let params:number=ref.current.location.href.split('detailid=')[1];
    // const obj = useContext(ctx);
    useEffect(()=>{
        axios.get("/getLandlord",{params:{"detailid":params}})
            .then((data)=>{
                let mytitle:any=data.data[0]
                setlandlord(mytitle.landlord)
            })
    },[])
    return (
        <div id="brc-room_master">
            <br />
            <h3>房东：{landlord} 联系房东</h3>
            <h4>共收到1021条评价 · 芝麻认证</h4>
        </div>
    );
}

export default Landlord;